gsk: Rename to gsk_texture_download_surface()
authorBenjamin Otte <otte@redhat.com>
Wed, 21 Dec 2016 19:28:21 +0000 (20:28 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 23 Dec 2016 07:11:01 +0000 (08:11 +0100)
I want to reuse the name gsk_texture_download() for downloading the
actual bytes.

gsk/gskgldriver.c
gsk/gskrendernodeimpl.c
gsk/gsktexture.c
gsk/gsktextureprivate.h
gsk/gskvulkanrenderer.c

index f08b1f925a3f9e406a14c99510cde6df0be6a756..ead05347fa0c5b0c685d570918e6f04c44d455bb 100644 (file)
@@ -462,7 +462,7 @@ gsk_gl_driver_get_texture_for_texture (GskGLDriver *driver,
   if (gsk_texture_set_render_data (texture, driver, t, gsk_gl_driver_release_texture))
     t->user = texture;
 
-  surface = gsk_texture_download (texture);
+  surface = gsk_texture_download_surface (texture);
   gsk_gl_driver_bind_source_texture (driver, t->texture_id);
   gsk_gl_driver_init_texture_with_surface (driver,
                                            t->texture_id,
index 8e428f4aebf3b19ad095159ecc4e91ff13df31d8..d2f27243d56ee7c295288301c93408eee1f38044 100644 (file)
@@ -601,7 +601,7 @@ gsk_texture_node_draw (GskRenderNode *node,
   GskTextureNode *self = (GskTextureNode *) node;
   cairo_surface_t *surface;
 
-  surface = gsk_texture_download (self->texture);
+  surface = gsk_texture_download_surface (self->texture);
 
   cairo_save (cr);
 
@@ -627,7 +627,7 @@ gsk_texture_node_serialize (GskRenderNode *node)
   cairo_surface_t *surface;
   GVariant *result;
 
-  surface = gsk_texture_download (self->texture);
+  surface = gsk_texture_download_surface (self->texture);
 
   g_assert (cairo_image_surface_get_width (surface) * 4 == cairo_image_surface_get_stride (surface));
 
index ceb36b2e500b7688f33ee5fb733c5f49298f3559..aabc805f0db120c6ba653cb2b1d27f3d987d7792 100644 (file)
@@ -135,7 +135,7 @@ gsk_texture_cairo_finalize (GskTexture *texture)
 }
 
 static cairo_surface_t *
-gsk_texture_cairo_download (GskTexture *texture)
+gsk_texture_cairo_download_surface (GskTexture *texture)
 {
   GskCairoTexture *cairo = (GskCairoTexture *) texture;
 
@@ -146,7 +146,7 @@ static const GskTextureClass GSK_TEXTURE_CLASS_CAIRO = {
   "cairo",
   sizeof (GskCairoTexture),
   gsk_texture_cairo_finalize,
-  gsk_texture_cairo_download
+  gsk_texture_cairo_download_surface
 };
 
 GskTexture *
@@ -209,7 +209,7 @@ gsk_texture_pixbuf_finalize (GskTexture *texture)
 }
 
 static cairo_surface_t *
-gsk_texture_pixbuf_download (GskTexture *texture)
+gsk_texture_pixbuf_download_surface (GskTexture *texture)
 {
   GskPixbufTexture *pixbuf = (GskPixbufTexture *) texture;
 
@@ -220,7 +220,7 @@ static const GskTextureClass GSK_TEXTURE_CLASS_PIXBUF = {
   "pixbuf",
   sizeof (GskPixbufTexture),
   gsk_texture_pixbuf_finalize,
-  gsk_texture_pixbuf_download
+  gsk_texture_pixbuf_download_surface,
 };
 
 GskTexture *
@@ -276,9 +276,9 @@ gsk_texture_get_height (GskTexture *texture)
 }
 
 cairo_surface_t *
-gsk_texture_download (GskTexture *texture)
+gsk_texture_download_surface (GskTexture *texture)
 {
-  return texture->klass->download (texture);
+  return texture->klass->download_surface (texture);
 }
 
 gboolean
index c8d94b67891cc1ff8267d733a0eae63cec740903..13eba48eae07930514df747fbe672dd36cc06fa2 100644 (file)
@@ -30,14 +30,14 @@ struct _GskTextureClass {
   gsize size;
 
   void                  (* finalize)                    (GskTexture             *texture);
-  cairo_surface_t *     (* download)                    (GskTexture             *texture);
+  cairo_surface_t *     (* download_surface)            (GskTexture             *texture);
 };
 
 gpointer                gsk_texture_new                 (const GskTextureClass  *klass,
                                                          int                     width,
                                                          int                     height);
 GskTexture *            gsk_texture_new_for_surface     (cairo_surface_t        *surface);
-cairo_surface_t *       gsk_texture_download            (GskTexture             *texture);
+cairo_surface_t *       gsk_texture_download_surface    (GskTexture             *texture);
 
 gboolean                gsk_texture_set_render_data     (GskTexture             *self,
                                                          gpointer                key,
index 3cab29fd4a43696baf1858a963a9f797044ec882..bb3d79b48ea31ada7b10fc351f87ecd7d29f0c1a 100644 (file)
@@ -281,7 +281,7 @@ gsk_vulkan_renderer_ref_texture_image (GskVulkanRenderer *self,
   if (data)
     return g_object_ref (data->image);
 
-  surface = gsk_texture_download (texture);
+  surface = gsk_texture_download_surface (texture);
   image = gsk_vulkan_image_new_from_data (uploader,
                                           cairo_image_surface_get_data (surface),
                                           cairo_image_surface_get_width (surface),